package packet;

import shared.Consts.Priorities;
import client.ClientController;

/**
 *
 * @author Joel Garboden
 */
public class InviteToGameCmd extends Command
{
  int port;
  String ipAddress;
  int gameID;

  /**
   *
   * @param ipAddress
   * @param port
   */
  public InviteToGameCmd(String ipAddress, int port, int gameID)
  {
    this.ipAddress = ipAddress;
    this.port = port;
    this.gameID = gameID;
    this.priority = Priorities.URGENT;
  }

  @Override
  public boolean execCommand(ClientController client)
  {
    client.invitedToGame(ipAddress, port, gameID);
    return true;
  }

  @Override
  public String toString()
  {
    return "InviteToGameCmd: " + ipAddress + ":" + port;
  }
}
